home *** CD-ROM | disk | FTP | other *** search
/ Software of the Month Club (Business) 1997 July / Software of the Month Club - Business (Volume 239) (July 1997).iso / pc / startup.dxr / 00001_MAIN handlers.ls next >
Encoding:
Text File  |  1996-02-20  |  2.4 KB  |  95 lines

  1. global gFile, gCodePath, gCPU, gfileSep, gCDpath, gHDpath, gCDName, gXOBJPath, gStartupMovie
  2.  
  3. on startMovie
  4.   setMovieFrame()
  5.   InitIntro()
  6.   set gCodePath to gCDpath & "CODE" & gfileSep
  7.   set gStartupMovie to gCodePath & "INTRO"
  8.   InitalizePaths()
  9. end
  10.  
  11. on setMovieFrame
  12.   if the machineType = 256 then
  13.     go("PC")
  14.   else
  15.     go("mac")
  16.   end if
  17. end
  18.  
  19. on InitalizePaths
  20.   if the machineType = 256 then
  21.     set gCPU to #MPC
  22.     set gfileSep to "\"
  23.     set gHDpath to the pathName
  24.     set gCDName to gCDpath
  25.     set gXOBJPath to gCDName & "XOBJs\"
  26.   else
  27.     set gCPU to #MAC
  28.     set gfileSep to ":"
  29.     set gHDpath to the pathName
  30.     set gCDName to "Chaos:"
  31.     set gXOBJPath to gCDName & "XOBJMAC:"
  32.     if the colorDepth = 16 then
  33.       set the colorDepth to 8
  34.       set the colorDepth to 16
  35.       if the colorDepth <> 16 then
  36.         put "16-bit switch problem!"
  37.       end if
  38.     end if
  39.   end if
  40. end
  41.  
  42. on InitIntro
  43.   if the machineType = 256 then
  44.     set gCPU to #MPC
  45.     set gfileSep to "\"
  46.     openXLib(the pathName & "fileio.dll")
  47.     set PathList to ["C:\", "D:\", "E:\", "F:\", "G:\", "H:\", "I:\", "J:\", "K:\", "L:\", "M:\", "N:\", "O:\", "P:\", "Q:\", "R:\", "S:\", "T:\", "U:\", "V:\", "W:\", "X:\", "Y:\", "Z:\", "EOL"]
  48.     repeat with nextDrive in PathList
  49.       set gCDpath to nextDrive
  50.       set diskFound to ReadCDTestFile()
  51.       put diskFound && "Reading from disk:" && gCDpath
  52.       if diskFound then
  53.         exit
  54.       end if
  55.       if gCDpath = "EOL" then
  56.         CantFindCD()
  57.       end if
  58.     end repeat
  59.   else
  60.     set cpu to #MAC
  61.     set gfileSep to ":"
  62.     set gCDpath to "Chaos:"
  63.     set diskFound to ReadCDTestFile()
  64.     if not diskFound then
  65.       CantFindCD()
  66.     end if
  67.   end if
  68. end
  69.  
  70. on ReadCDTestFile
  71.   put "READ CD ROUTINE"
  72.   if objectp(gFile) then
  73.     gFile(mdispose)
  74.   end if
  75.   set TestPath to gCDpath & "CDFINDER.TXT"
  76.   set gFile to FileIO(mnew, "read", TestPath)
  77.   if not objectp(gFile) then
  78.     put "NOT found"
  79.     return 0
  80.   else
  81.     gFile(mdispose)
  82.     put "Found!"
  83.     return 1
  84.   end if
  85. end
  86.  
  87. on CantFindCD
  88.   if the machineType = 256 then
  89.     alert("You don't seem to have the Chaos CD-ROM loaded!  Please make sure the CD is in the drive." & RETURN & RETURN & "Then restart the application.")
  90.   else
  91.     alert("You don't seem to have the Chaos CD-ROM loaded!  Please make sure the CD is in the drive and that the" && QUOTE & "Chaos" & QUOTE && "icon appears on the desktop." & RETURN & RETURN & "Then restart the application.")
  92.   end if
  93.   halt()
  94. end
  95.